package com.chenjun.core.vo.sys;

import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;

import org.springframework.beans.BeanUtils;

import com.chenjun.core.dao.generator.entity.SysArea;



@SuppressWarnings("serial")
public class SysAreaDto implements Serializable{
	
    /**
     * 行政区域表  
     * db_column: id 
     */	
	private String id;
    /**
     * 区域名称  
     * db_column: name 
     */	
	private String name;
    /**
     * 上一级区域id  
     * db_column: parent_id 
     */	
	private String parentId;
    /**
     * 上一级区域ids
     * db_column: parent_ids 
     */	
	private String parentIds;
    /**
     * 排序  
     * db_column: sort_index 
     */	
	private int sortIndex;
    /**
     * 0:否；1:禁用  
     * db_column: disabled 
     */	
	private String disabled;
    /**
     * 区域级别：-1:宇宙；0:国家；1:省；2:市  
     * db_column: level 
     */	
	private String level;
    /**
     * 0:不删除；1:删除  
     * db_column: isDelete 
     */	
	private String isDelete;
	
	public void setId(String id) {
		this.id = id == null ? null : id.trim();
	}
	
	public String getId() {
		return this.id;
	}
	
	public void setName(String name) {
		this.name = name == null ? null : name.trim();
	}
	
	public String getName() {
		return this.name;
	}
	
	public void setParentId(String parentId) {
		this.parentId = parentId == null ? null : parentId.trim();
	}
	
	public String getParentId() {
		return this.parentId;
	}

	public String getParentIds() {
		return parentIds;
	}

	public void setParentIds(String parentIds) {
		this.parentIds = parentIds;
	}

	public void setSortIndex(int sortIndex) {
		this.sortIndex = sortIndex;
	}
	
	public int getSortIndex() {
		return this.sortIndex;
	}
	
	public void setDisabled(String disabled) {
		this.disabled = disabled == null ? null : disabled.trim();
	}
	
	public String getDisabled() {
		return this.disabled;
	}
	
	public void setLevel(String level) {
		this.level = level == null ? null : level.trim();
	}
	
	public String getLevel() {
		return this.level;
	}
	
	public String getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(String isDelete) {
		this.isDelete = isDelete;
	}

	/**
	 * 根据Bean获取Model模型
	 * @return
	 * PayBean
	 * @throws InvocationTargetException 
	 * @throws IllegalAccessException 
	 */
	public static SysAreaDto getDtoByModel(SysArea source) throws IllegalAccessException, InvocationTargetException{
		SysAreaDto target = new SysAreaDto();
		BeanUtils.copyProperties(source, target);
		return target;
	}
	
	/**
	 * 根据Model获取Bean模型
	 * @return
	 * PayBean
	 * @throws InvocationTargetException 
	 * @throws IllegalAccessException 
	 */
	public static SysArea getModelByDto(SysAreaDto source) throws IllegalAccessException, InvocationTargetException{
		SysArea target = new SysArea();
		BeanUtils.copyProperties(source, target);
		return target;
	}
}
